﻿/********************************************************
 * ADO.NET 2.0 Data Provider for SQLite Version 3.X
 * Written by Robert Simpson (robert@blackcastlesoft.com)
 * 
 * Released to the public domain, use at your own risk!
 ********************************************************/
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.VisualStudio.Data;
using Microsoft.VisualStudio.Data.AdoDotNet;
using System.Data.EffiProz;

namespace EffiProz.Designer
{
    class EfzDataSourceInformation : AdoDotNetDataSourceInformation
    {

        public EfzDataSourceInformation(DataConnection connection)
            : base(connection)
        {
            Initialize(connection.ConnectionSupport.ProviderObject as EfzConnection);
        }

        private void Initialize(EfzConnection connection)
        {
          
            AddProperty(DefaultSchema,"PUBLIC");
            AddProperty(DefaultCatalog, "PUBLIC");
            AddProperty(SupportsQuotedIdentifierParts, true);
            AddProperty(IdentifierOpenQuote, "\"");
            AddProperty(IdentifierCloseQuote, "\"");
            AddProperty(CatalogSeparator, "");
            AddProperty(CatalogSupported, true);
            AddProperty(CatalogSupportedInDml, true);
            AddProperty(SchemaSupported, true);
            AddProperty(SchemaSupportedInDml, true);
            AddProperty(SchemaSeparator, ".");
            AddProperty(ParameterPrefix, "@");
            AddProperty(ParameterPrefixInName, true);
            AddProperty(SupportsAnsi92Sql, true);
         
            if (!connection.IsNetConnection)
            {
                AddProperty("DeskTopDataSource", true);
                AddProperty("LocalDatabase", true);
            }
        }
    }
}
